<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%
	String hospitalNotesJson= (String)request.getAttribute("hospitalNotesJson");
	String pageJson= (String)request.getAttribute("pageJson");
 %>


<!--内容部分-->

    
<div class="list_NR">
    <div class="loc">
        <h3>归档审核</h3>
        <ul class="loc_loc">
          	  病案归档 > 归档审核
        </ul>
    </div>
    
      <div class="list_con_table">
        <input type="hidden" value="${medTraceQuery.totalCounts }" id="totalCountsHidden">
		<form action="${basePath}/medrecord/pigeonholeCheck" method="get" id="queryForm">
		<input type="hidden" name="currentPage" value="${medTraceQuery.currentPage }" id="currentPageHidden">
    	<input type="hidden" name="pageSize" value="${medTraceQuery.pageSize }" id="pageSizeHidden">
    	<div class="search_table">
           <ul class="clearfix" style="margin-bottom:0;">

            <li class="Label_1" style="width:11%">出院日期：&nbsp;</li>
               <li class="Label_2" style="width:27%;">
                   <input style="width:43%;" class="input_box" name="outHospitalStartDate" value='<fmt:formatDate value="${medTraceQuery.outHospitalStartDate}" pattern="yyyy-MM-dd"/>' onFocus="WdatePicker()" type="text" > 
                   - <input style="width:43%" class="input_box" name="outHospitalEndDate"  value='<fmt:formatDate value="${medTraceQuery.outHospitalEndDate}" pattern="yyyy-MM-dd"/>' onFocus="WdatePicker()" type="text" >
               </li>
               <li class="Label_1" style="width:11%">识别码：&nbsp;</li>
               <li class="Label_2">
               	<input class="input_box" type="text"  name="mrId" value='${medTraceQuery.mrId }' />
               </li>
               <li class="Label_1" style="width:11%">患者名：&nbsp;</li>
               <li class="Label_2">
               	<input class="input_box" type="text"  name="name" value='${medTraceQuery.name }' />
               </li>
               
               <li class="Label_1" style="width:11%">归档日期：&nbsp;</li>
                    <li class="Label_2" style="width:27%;">
                    <input class="input_box" style="width:43%;" type="text"  name="traceStartDate" value='<fmt:formatDate value="${medTraceQuery.traceStartDate}" pattern="yyyy-MM-dd"/>' onFocus="WdatePicker()"/> - 
                    <input class="input_box" style="width:43%" type="text"  name="traceEndDate"  value='<fmt:formatDate value="${medTraceQuery.traceEndDate}" pattern="yyyy-MM-dd"/>' onFocus="WdatePicker()"/>
                    </li>
               <li class="Label_1" style="width:11%">身份证号：&nbsp;</li>
               <li class="Label_2" >
               	<input class="input_box" type="text" name="idCard" id='' value='${medTraceQuery.idCard}' />
               	 
               </li>
               
               
              
               
               <li class="Label_1" style="width:11%">出院科室：&nbsp;</li>
               <li class="Label_2" >
               
               	<select class="input_box" style="width:96%" name="outHospitalOfficeId">
               		<option value="">请选择</option>
               		<c:forEach var="office" items="${offices }"> 
               			<option <c:if test="${medTraceQuery.outHospitalOfficeId==office.id}">selected="selected"</c:if> value="${office.id }">${office.name }</option>
               		</c:forEach>
                	
                	</select>
                </li>
                
                <li class="Label_5">
                    <div class="right">
                    	<a id="Add" onclick="queryFormSubmit()">查询</a>
                    </div>
                </li>
            </ul>
        </div>
     </form>

   </div>

   <table class="Search_tableList"cellpadding="0" cellspacing="0">

       <tr>
           <td class="tdLabel_4">姓名</td>
           <td class="tdLabel_4">识别码</td>
           <td class="tdLabel_4">出院日期</td>
           <td class="tdLabel_4">出院科室</td>
           <td class="tdLabel_4">归档日期</td>
           <td class="tdLabel_4">审核结果</td>
       </tr>
       
      
       <tbody id="tbody">
        </tbody>
           
       
    </table>

    
</div>
<!--script JS部分-->
<script type="text/javascript" src="${basePath}/static/publics/assets/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/static/publics/assets/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="${basePath}/static/publics/assets/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${basePath}/static/publics/assets/jqPaginator/jqPaginator.js"></script>
<script type="text/javascript">
	function queryFormSubmit(){
		$("#currentPageHidden").val("1");
		$("#queryForm").submit();
	}

	$(function(){
		var data= <%=hospitalNotesJson%>;
		var page= <%=pageJson%>;
		var html ="";
		for(var i in data){
			var med=data[i];
			
			html+="<tr>"+
		                "<td class='tdLabel_5'>"+(med.patient_name==undefined?'':med.patient_name)+"</td>"+
		               " <td class=tdLabel_5>"+(med.mr_id==undefined?'':med.mr_id)+"</td>"+
		               " <td class=tdLabel_5>"+(med.out_hospital_date==undefined?'':med.out_hospital_date)+"</td>"+
		                "<td class='tdLabel_5'>"+(med.office_name==undefined?'':med.office_name)+"</td>"+
		               " <td class=tdLabel_5>"+(med.trace_date==undefined?'':med.trace_date)+"</td>"+
		               " <td class='tdLabel_5'>"+(med.check_result==undefined?'':med.check_result)+"</td>";
		               
		}
		$("#tbody").html(html);
		
	});
	
	
</script>
